package com.wang.java.basic.framework.queue.deque;

import java.util.concurrent.ConcurrentLinkedDeque;

/**
 * 并发链表双端队列
 * 数据结构：链表
 * 线程安全：是，基于CAS实现
 * 队列长度：无界
 * 阻塞性：非阻塞
 */
public class ConcurrentLinkedDequeTest {
    public static void main(String[] args) {
        ConcurrentLinkedDeque<String> concurrentLinkedDeque = new ConcurrentLinkedDeque<>();
        concurrentLinkedDeque.offerLast("1");
        concurrentLinkedDeque.offerFirst("2");
        System.out.println(concurrentLinkedDeque.poll());
        System.out.println(concurrentLinkedDeque.poll());
    }
}
